﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

using Hangjing.Model;
using Hangjing.SQLServerDAL;
using Hangjing.Common;
using System.Text;

/// <summary>
/// 获取商品统一分类 
/// </summary>
public partial class App_Android_GetShopTypeList : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        Response.Clear();

        StringBuilder shoplistjson = new StringBuilder();

        EFoodSort dal = new EFoodSort();
        IList<ShopDataInfo> list = SectionProxyData.GetSortList();

        shoplistjson.Append("{\"page\":\"1\",\"total\":\"" + 1+ "\",\"datalist\":[");

        ShopDataInfo info = null;

        for (int i = 0; i < list.Count; i++)
        {
            info = new ShopDataInfo();

            info = list[i];

            shoplistjson.Append("{\"SortID\":\"" + info.ID + "\",\"SortName\":\"" + info.classname + "\",\"JOrder\":\"" + info.Priority + "\"},");
        }

        shoplistjson.Append("]}");

        Response.Write(shoplistjson.ToString().Replace(",]}", "]}"));
        Response.End();

    }
}

